# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Run.V1.Model.ContainerOverride do
  @moduledoc """
  Per container override specification.

  ## Attributes

  *   `args` (*type:* `list(String.t)`, *default:* `nil`) - Arguments to the entrypoint. The specified arguments replace and override any existing entrypoint arguments. Must be empty if `clear_args` is set to true.
  *   `clearArgs` (*type:* `boolean()`, *default:* `nil`) - Optional. Set to True to clear all existing arguments.
  *   `env` (*type:* `list(GoogleApi.Run.V1.Model.EnvVar.t)`, *default:* `nil`) - List of environment variables to set in the container. All specified environment variables are merged with existing environment variables. When the specified environment variables exist, these values override any existing values.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the container specified as a DNS_LABEL.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :args => list(String.t()) | nil,
          :clearArgs => boolean() | nil,
          :env => list(GoogleApi.Run.V1.Model.EnvVar.t()) | nil,
          :name => String.t() | nil
        }

  field(:args, type: :list)
  field(:clearArgs)
  field(:env, as: GoogleApi.Run.V1.Model.EnvVar, type: :list)
  field(:name)
end

defimpl Poison.Decoder, for: GoogleApi.Run.V1.Model.ContainerOverride do
  def decode(value, options) do
    GoogleApi.Run.V1.Model.ContainerOverride.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Run.V1.Model.ContainerOverride do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
